<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head(title)">
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title th:text="${title}">博客</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}" />
    <script th:src="@{/layui/layui.js}"></script>
</head>
<body>

<header th:fragment="header" class="gird-header">
    <div class="header-fixed">
        <div class="header-inner">
            <a th:href="@{/blog/index}" class="header-logo" id="logo">Z-BLOG</a>
            <nav class="nav" id="nav">
                <ul>
                    <li><a th:href="@{/blog/index}">首页</a></li>
                    <li><a th:href="@{/blog/article}">博客</a></li>
                    <li><a th:href="@{/blog/message}">留言</a></li>
                    <li>
                        <div class="search" style="padding-left: 30px;">
                            <label class="search-wrap">
                                <input type="text" id="searchtxt" placeholder="输入关键字搜索">
                                <span class="search-icon">
					                <i class="fa fa-search"></i>
					            </span>
                            </label>
                            <ul class="search-result"></ul>
                        </div>
                    </li>
                </ul>
            </nav>
            <a href="/User/QQLogin" class="blog-user">
                <i class="fa fa-qq"></i>
            </a>
            <a class="phone-menu">
                <i></i>
                <i></i>
                <i></i>
            </a>
        </div>
    </div>
</header>


<footer th:fragment="footer" class="footer wow fadeInUp" id="contact">
    <div class="footer-top">
        <div class="container">
            <div class="layui-row">
                <div class="layui-col-xs12 layui-col-sm6 layui-col-md4">
                    <div class="single-widget about">
                        <div class="footer-logo">
                            <h2>Z个人博客</h2>
                        </div>
                        <p>世界那么大，我想去看看</p>
                        <div class="button">
                            <a th:href="@{/blog/aboutme}" class="btn layui-btn layui-btn-normal">About Me</a>
                        </div>
                    </div>
                </div>
                <div class="layui-col-xs12 layui-col-sm6 layui-col-md4">
                    <div class="single-widget">
                        <h2>相关链接</h2>
                        <ul class="social-icon">
                            <li class="active"><a th:href="@{/blog/article}"><i class="fa fa-book"></i>博文</a></li>
                            <li class="active"><a th:href="@{/blog/message}"><i class="fa fa-comments"></i>留言板</a></li>
                        </ul>
                    </div>
                </div>
                <div class="layui-col-xs12 layui-col-sm12 layui-col-md4">
                    <div class="single-widget contact">
                        <h2>联系我</h2>
                        <ul class="list">
                            <li><i class="fa fa-map"></i>地址:山西省太原市</li>
                            <li><i class="fa fa-qq"></i>QQ: 184100072 </li>
                            <li><i class="fa fa-envelope"></i>邮箱: 184100072@qq.com</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="copyright">
        <div class="container">
            <div class="layui-row">
                <div class="layui-col-xs12 layui-col-sm12 layui-col-md12 text-center">
                    <a style="color:#666" target="_blank" rel="noopener" href="http://beian.miit.gov.cn/">晋ICP备18011938号-1</a>
                    <a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=14010802080274" style="display:inline-block;text-decoration:none;height:20px;line-height:20px;">
                        <p style="color:#666;">
                            <img style="padding-left: 20px; float: left" src=""/>
                            晋公网安备 14010802080274号
                        </p>
                    </a>
                </div>
            </div>
        </div>
    </div>

    <script>
        function loadScript(url, callback) {
            var script = document.createElement('script');
            script.type = 'text/javascript';
            script.onload = callback;
            script.src = url;
            document.head.appendChild(script);
        }

        // 在特定时间加载特定的JS文件
        var specificTime = '12-25'; // 设置特定时间


        // 获取当前日期的月份（从0开始，0表示一月）
        var currentMonth = new Date().getMonth() + 1;

        // 获取当前日期的日期数
        var currentDate = new Date().getDate();
        var nowDay = currentMonth+"-"+currentDate; // 获取当前时间

        if (nowDay == specificTime) {
            let htmlStr = '<div class="container">\n' +
                '        <div class="demo">\n' +
                '            <div class="snowwrap">\n' +
                '                <div class="snow-container"></div>\n' +
                '            </div>\n' +
                '\n' +
                '            <style type=\'text/css\'>\n' +
                '                .snowwrap,.snow-container{position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100001;}\n' +
                '            </style>\n' +
                '        </div>\n'+
                '    </div>';
            document.body.innerHTML += htmlStr;
            loadScript('/blog/js/jquery.min.js', function() {
                // 特定JS文件加载完成后执行的回调函数
                console.log('jquery.min.js 已加载');
                loadScript('/blog/js/plugins/snow.js', function() {
                    // 特定JS文件加载完成后执行的回调函数
                    console.log('snow.js 已加载');
                });
            });

        }

    </script>
</footer>
</body>
</html>